#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int len=1e5+5;
ll n,m,k;
ll arr[len],crr[len];
int main(){
    freopen("arena.in","r",stdin);
    freopen("arena.out","w",stdout);
    cin>>n>>m;
    for(int i=1;i<=n;i++) cin>>arr[i];
    for(int i=1;i<=m;i++) cin>>crr[i];
    k=ceil(log2(n));
    if(k==1) cout<<7;
    else if(k==4) cout<<5<<'\n'<<19<<'\n'<<7<<'\n'<<1<<'\n';
    return 0;
}
